package com.situ.web.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.situ.web.dao.Impl.StudentDaoImpl;
import com.situ.web.entity.Banji;
import com.situ.web.entity.Student;
import com.situ.web.service.IStudentService;
import com.situ.web.vo.StudentBanjiVO;

public class StudentServiceImpl implements IStudentService{
	StudentDaoImpl studentDao = new StudentDaoImpl();
	@Override
	public ArrayList<StudentBanjiVO> selectAll() {
		ArrayList<StudentBanjiVO> list = studentDao.selectAll();
		return list;
	}
	@Override
	public boolean delete(int id) {
		int count = studentDao.delete(id);
		return count == 1 ? true:false;
	}
	@Override
	public boolean insert(StudentBanjiVO student) {
		int count = studentDao.insert(student);
		return count == 1 ? true:false;
	}
	@Override
	public Student selectId(int selectId) {
		Student student = studentDao.selectId(selectId);
		return student;
	}
	@Override
	public boolean update(StudentBanjiVO student) {
		int count = studentDao.update(student);
		return count == 1 ? true:false;
	}
	@Override
	public ArrayList<StudentBanjiVO> selectName(String selectName) {
		ArrayList<StudentBanjiVO> list = studentDao.selectName(selectName);
		return list;
	}
	@Override
	public ArrayList<Banji> selectBanjiName() {
		ArrayList<Banji> list = studentDao.selectBanjiName();
		return list;
	}


}
